// createnews
import request from "../request/request"
//创建用户
export const CreateNews=(data)=>{
    return request.post('/news/createnews',data)
}
// newslist
export const GetNewsList=()=>{
    return request.get("/news/newslist")
}
export const DeleteNews=(id)=>{
    return request.post("/news/newsDelete",{
        data:{
            id
        }
    })
}
//发布 ispublishnews
export const isPublishNews=(ispublish,id)=>{
    return request.post("/news/ispublishnews",{
        data:{
            ispublish,
            id
        }
    })
}
// 编辑 editnews
export const EditNews=(data)=>{
    return request.post("/news/editnews",data)
    }
export const GetNewsData=(id)=>{
    return request.get("/news/newsid",{
        params:{
            id
        }
    })
}